﻿using Commander.Core.UIs.WinForms.Controls.Views;

namespace Commander.Core.UIs.WinForms
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Drawing;
    using System.Text;
    using Commander.Core.Interfaces.Shared;
    using System.Windows.Forms;

    /// <summary>
    /// IGuiManager for WinForms
    /// </summary>
    class WinFormGuiManager : IGuiManager
    {
        private BaseDialog m_mainDialog;

        private MainView m_mainView;

        #region IGuiManager Members

        public object MainView
        {
            get { return m_mainView; }
        }

        public void RunMainLoop()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);            

            m_mainDialog = new BaseDialog();
            m_mainView = new MainView();

            m_mainDialog.SetContent(m_mainView);
            m_mainDialog.StartPosition = FormStartPosition.CenterScreen;
            m_mainDialog.Size = new Size(800, 600);                        
            
            Application.Run(m_mainDialog);
        }

        public void Show(object view)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
